package com.dao;

import java.util.List;

import com.entity.Topic;
import com.exception.DaoException;

public interface TopicDao {

	List<Topic> selectTopics() throws DaoException;

	/**
	 * 分页查询主题
	 * 
	 * @param page 页数
	 * @param row 行数
	 * @return
	 * @throws DaoException
	 */
	List<Topic> selectTopicsByPage(int page, int row) throws DaoException;

	/**
	 * 添加标题
	 * 
	 * @param tname
	 * @return
	 * @throws DaoException
	 */
	boolean addTopic(String tname) throws DaoException;

	boolean deleteTopic(Integer tid) throws DaoException;

	Topic getTopic(Integer tid) throws DaoException;

	// 修改
	boolean updateTopic(Integer tid, String tname) throws DaoException;

}
